Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Allow for cross-OS cross compiles, implement dest-cpu, dest-os options #2148

Closed
wants to merge 3 commits into from

Conversation

adammw
Copy link

@adammw adammw commented Nov 19, 2011

This is step 1 to cross-compile for Windows on Linux (other patches to uv.gyp and v8.gyp needed for this).
Also, I made it pay respect to dest-cpu and dest-os options.
Hopefully, fixes #1736 (not sure, looks to be only once) by setting want_separate_host_toolset variable.

Not sure what to do with libz and some other tidbits, see TODOs in the code.

For example, to cross-compile for Windows on Linux (other patches needed for this).
Also pays respect to dest-cpu and dest-os options.
Fixes nodejs#1736
'darwin': 'mac',
'sunos5': 'solaris',
'freebsd7': 'freebsd',
'freebsd7': 'freebsd',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate key. You should probably replace it with if os.startswith('freebsd'): return 'freebsd' so it won't fail on freebsd 9 and 10 systems (same goes for linux 3.x).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by commit adammw/node@7397992 .
Linux 3.x should have just been either linux2 or linux according to python docs as their phasing out version numbers, but this is now irrelevant as new commit uses startswith for all (although the windows check may be a bit too permissive now I think about it).

@bnoordhuis
Copy link
Member

Closing. The PR no longer applies and I'm not even sure if this is a feature we need.

@bnoordhuis bnoordhuis closed this Jul 28, 2012
@adammw
Copy link
Author

adammw commented Jul 29, 2012

Yes I don't think this patch is relevant anymore in terms of the way to do it, however I'm still not sure that node can successfully be cross-compiled for Windows on a non-Windows (e.g. Linux) machine using the mingw compilers. Has this been tested to work or does an issue report already exist?

@bnoordhuis
Copy link
Member

Has this been tested to work or does an issue report already exist?

No. But we (or rather, gyp) don't support mingw on Windows, let alone another OS.

gibfahn pushed a commit to ibmruntimes/node that referenced this pull request Mar 31, 2016
PR-URL: nodejs/node#5920
Refs: nodejs/node#2148
Reviewed-By: Brian White <mscdex@mscdex.net>
smanders pushed a commit to externpro-archive/node-v0.x-archive that referenced this pull request Apr 8, 2016
PR-URL: nodejs/node#5920
Refs: nodejs/node#2148
Reviewed-By: Brian White <mscdex@mscdex.net>
richardlau pushed a commit to ibmruntimes/node that referenced this pull request Apr 12, 2016
PR-URL: nodejs/node#5920
Refs: nodejs/node#2148
Reviewed-By: Brian White <mscdex@mscdex.net>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants